package com.ai.bitcoin.jpa.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "bcc_article", uniqueConstraints = {@UniqueConstraint(columnNames = {"uniqueKey", "bccId"})})
@Data
public class BccArticle extends Identity {
    private static final long serialVersionUID = 1L;
    @Column(unique = true)
    String uniqueKey;
    //文章类型 1 公告 2 舆情
    String articleType;
    String batchNo;
    String bccId;
    @Transient
    String symbol;
    String sourceUrl;
    String sourceDomain;
    //利好数量
    long bullCount;
    //利空数量
    long bearCount;
    //标题
    String title;
    //标签
    String tagList;
    //内容明细
    String description;
    //音频地址
    String speechUrl;
    //标签
    @DateTimeFormat(pattern = "yyyy/MM/dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss", timezone = "GMT+8")
    Date createTime;
    @DateTimeFormat(pattern = "yyyy/MM/dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd hh:mm:ss", timezone = "GMT+8")
    Date updateTime;
}
